function getParmasByUrl(url, name) {

    var parmas = url.substr(url.indexOf('?') + 1);

    var parma = parmas.split('&');

    console.log(parma);

    for (let i = 0; i < parma.length; i++) {

        var current = parma[i].split('=');

        if (current[0] == name) {

            return current[1]
        }
    }
    return null;
}
